import socket
import os
# #客户端

s = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
s.connect(('127.0.0.1',8001))
flie = open(r"D:\python_test\20193323", "a")
flie.write("123")
flie.close()
flie = open(r"D:\python_test\20193323", "r")
str1 = flie.readlines()
for item in str1:
    str=item
s.sendall(str.encode())
data = s.recv(1024)
print(data.decode())
s.close()
